package cn.wizzer.app.user.modules.models.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum OprTypeEnum {
    ADDED("(被)添加"),
    REMOVED("(被)移除"),
    SENT("(已)发消息"),
//    READ("(已)读取"),
    ;
    public final String type;

    OprTypeEnum(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public static List toList() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (OprTypeEnum oprTypeEnum : OprTypeEnum.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("name", oprTypeEnum.getType());
            map.put("val", oprTypeEnum);
            list.add(map);
        }
        return list;
    }
}
